-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
app was created #909
base: master
Are you sure you want to change the base?
app was created #909
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job. Check my comments to improve your code
src/components/NewCommentForm.tsx
Outdated
onChange={(e) => { | ||
setName(e.target.value); | ||
setIsNameAllright(true); | ||
}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create separate handler instead of anonymous function. Try fix all places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/components/Post.tsx
Outdated
onClick={() => { | ||
return isPostSelected | ||
? handleSelectPost(undefined) | ||
: handleSelectPost(post); | ||
}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return is redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Co-authored-by: Ivan Fesenko <61904995+IvanFesenko@users.noreply.github.com>
Co-authored-by: Ivan Fesenko <61904995+IvanFesenko@users.noreply.github.com>
Co-authored-by: Ivan Fesenko <61904995+IvanFesenko@users.noreply.github.com>
https://Pavlo-Petrashevskyi.github.io/react_dynamic-list-of-posts/